<style>
    #js-hongbao .bg {
        width: 100vw;
        height: 100vh;
        position: fixed;
        top: 0;
        background: rgba(0, 0, 0, 0.5);
    }

    #js-hongbao .wrap {
        position: fixed;
        top: 0;
        width: 100vw;
        height: 100vh;
    }

    #js-hongbao .wrap .img {
        position: relative;
    }

    #js-hongbao .wrap img.red-bg {
        width: 70vw;
    }

    #js-hongbao .wrap img.red-click {
        position: absolute;
        width: 100px;
        bottom: 10%;
        left: 50%;
        margin-left: -50px;
    }

    #js-hongbao .close img {
        margin-top: 20px;
        width: 40px;
    }
</style>
<div id="js-hongbao">
    <div class="bg"></div>
    <div class="wrap flex-c flex-col">
        <div class="img">
            <img class="red-bg" src="../image/icon/mp_bg_luckybag.png" alt="">
            <img class="red-click" src="../image/icon/mp_btn_openluckybag.png" alt="" onclick="openRed()">
        </div>
        <div class="close">
            <img src="../image/icon/close.png" alt="" onclick="closeMoneyFrm()">
        </div>
    </div>
</div>
<script>
    // 打开红包
    function openRed() {
        _ajax('home/privatechat/receive', function (ret, err) {
            _log(JSON.stringify(ret));
            _log(JSON.stringify(err));
            var msg = ret.msg;
            _msg(msg);
            if (ret.code == 200) {
                _url({
                    id: redId
                }, 'frame0/hong_bao_detail');
            }
        }, {
            chat_id: redId,
            user_id: myuserid,
        })
    }

    function closeFrame() {

    }
</script>